import { Method } from '../method'
import service from '../service'

export default {
  getArea() {
    return service({
      url: `/seal/rest/organize/getArea`,
      method: Method.POST,
      body: {},
    })
  },
  // 查询指定区域的下一级  或指定区域与名称的所有匹配项
  getTreeWithAreaAndName(uuid: string, fullName: string) {
    return service({
      url: `/seal/rest/organize/getTreeWithAreaAndName`,
      method: Method.POST,
      body: {
        uuid,
        fullName,
      },
    })
  },
  getMyManageOrganizeList() {
    return service({
      url: '/seal/rest/organize/getMyManageOrganizeList',
      method: Method.POST,
      body: {},
    })
  },
  // 查询子机构
  getOrganizeTree(parentUUID: string) {
    return service({
      url: `/seal/rest/organize/getOrganizeTree`,
      method: Method.POST,
      body: {
        parentUUID,
      },
    })
  },
  // 查询组织机构详情
  getOrganizeDetail(uuid: string) {
    return service({
      url: '/seal/rest/organize/getOrganizeDetail',
      method: Method.POST,
      body: {
        uuid,
      },
    })
  },
}
